#include "recordaudiothread.h"

extern "C" {

    #include <libavcodec/avcodec.h>
    #include <libavformat/avformat.h>

}

RecordAudioThread::RecordAudioThread(QObject *parent) : QThread(parent)
{

    connect(this,&QThread::finished,this,&QThread::deleteLater);

}

RecordAudioThread::~RecordAudioThread()
{

    // 清除所有的链接
    disconnect();

    // 线程结束
    requestInterruption();


    quit();

    wait();

    qDebug() << "RecordAudioThread destory";
}

void RecordAudioThread::run()
{

    if(!isInterruptionRequested()) {


        // 录制音频

    }




}
